package com.wbp.cms.client.common.service;

import java.io.Serializable;
import java.util.List;

import com.wbp.cms.client.common.domain.DictionaryDO;
import com.wbp.cms.client.common.query.DictionaryQuery;
import com.wbp.cms.client.result.Result;

/**
 * @Description:
 * @Department:
 * @author andy.lhc
 * @date 2016年3月6日 下午10:12:10
 */
public interface DictionaryService extends Serializable {

    public   Long   addDictionary(DictionaryDO  dictionaryDO) ;
    
    public  boolean modifyDictionary(DictionaryDO  dictionaryDO) ;
    
    public boolean  deleteDictionary(Long id) ;
    
    public  DictionaryDO  loadDictionary(Long  id) ;
    
    public  Result<List<DictionaryDO>>  queryDictionary(DictionaryQuery  dictionaryQuery) ;
    
    public List<DictionaryDO>  queryDictionary(String tableName,String attributeName) ;
    
    public List<DictionaryDO>  queryChildDictionary(String tableName,String attributeName,Integer value) ;
    
    /**
     * 查一个字典值 的描述值显示在页面上
     * @param tableName
     * @param attributeName
     * @param value
     * @return
     */
    public DictionaryDO   queryDictionary(String tableName,String attributeName,Integer value) ;
    
    /** 
     * 查 业务表中的字典值， tableName !='Dictionary'
     * @param tableName
     * @param attributeName
     * @param parentId
     * @return
     */
    public List<DictionaryDO>  queryDictionary(String tableName,String attributeName,Long parentId) ;
    
    /**
     * 只查元数据描述字段的字段值  tableName='Dictionary'
     * @param tableName
     * @param attributeName
     * @param parentId
     * @return
     */
    public List<DictionaryDO> queryMetaDictionary(String tableName, String attributeName, Long parentId) ;
    /**
     * 只查元数据描述字段的字段值  
     * @param tableName 
     * @param attributeName
     * @param code
     * @return
     */
    public List<DictionaryDO> queryMetaDictionary(String tableName, String attributeName, String code) ;
    
}
